package com.zy.web.demo.shejimoshi.danli;

/**
 * @author <a href="mailto:zhouyong@cqyyt.com">zy</a>
 * @version 1.0
 * @date 2020/8/19 9:55
 * 枚举
 * 枚举不易被破坏，枚举类是线程安全的，并且只会加载一次，写法简写
 */
public enum DanLi6 {

    INSTANCE;
    private SingletonClass instance;
    private DanLi6() {
        instance = new SingletonClass();
    }
    public SingletonClass getInstance() {
        return instance;
    }

    class SingletonClass {
    }

}
